package com.cg.annotation.impl;

import com.cg.annotation.CurrentUser;

import java.lang.reflect.Field;

/**
 * @author cheyinbo
 * @description TODO
 * @date 2021/7/7 11:06
 */
public class CurrentUserImpl {

    public static void getUserInfo(Class<?> c){
        Field[] declaredFields = c.getDeclaredFields();
        for (Field field : declaredFields) {
            if(field.isAnnotationPresent(CurrentUser.class)){
                System.out.println(field.getName());
            }
        }

    }

    public static void main(String[] args) {

    }

}
